'use strict';

import Vue from 'vue'
import util from '@/util/Util'
import qs from 'qs'

const _vue = new Vue()

const _message = {
	// 获取用户所有消息
	'getAllMessage': function(param) {
		return _vue.$axios.post(util.getServerUrl('/message/getAllMessage'), {
				'userId': param.userId,
			})
			.then(function(response) {
				if(param.success) {
					param.success(response)
				}
				return response
			})
			.catch(function(error) {
				console.log(error)
			})
	},
}

export default _message